var dataGZ = [
	[1, 26, 37, 27, 1.163, 27, 13, "优"],
	[2, 85, 62, 71, 1.195, 60, 8, "良"],
	[3, 78, 38, 74, 1.363, 37, 7, "良"],
	[4, 21, 21, 36, 0.634, 40, 9, "优"],
	[5, 41, 42, 46, 0.915, 81, 13, "优"],
	[6, 56, 52, 69, 1.067, 92, 16, "良"],
	[7, 64, 30, 28, 0.924, 51, 2, "良"],
	[8, 55, 48, 74, 1.236, 75, 26, "良"],
	[9, 76, 85, 113, 1.237, 114, 27, "良"],
	[10, 91, 81, 104, 1.041, 56, 40, "良"],
	[11, 84, 39, 60, 0.964, 25, 11, "良"],
	[12, 64, 51, 101, 0.862, 58, 23, "良"],
	[13, 70, 69, 120, 1.198, 65, 36, "良"],
	[14, 77, 105, 178, 2.549, 64, 16, "良"],
	[15, 109, 68, 87, 0.996, 74, 29, "轻度污染"],
	[16, 73, 68, 97, 0.905, 51, 34, "良"],
	[17, 54, 27, 47, 0.592, 53, 12, "良"],
	[18, 51, 61, 97, 0.811, 65, 19, "良"],
	[19, 91, 71, 121, 1.374, 43, 18, "良"],
	[20, 73, 102, 182, 2.787, 44, 19, "良"],
	[21, 73, 50, 76, 0.717, 31, 20, "良"],
	[22, 84, 94, 140, 2.238, 68, 18, "良"],
	[23, 93, 77, 104, 1.165, 53, 7, "良"],
	[24, 99, 130, 227, 3.97, 55, 15, "良"],
	[25, 146, 84, 139, 1.094, 40, 17, "轻度污染"],
	[26, 113, 108, 137, 1.481, 48, 15, "轻度污染"],
	[27, 81, 48, 62, 1.619, 26, 3, "良"],
	[28, 56, 48, 68, 1.336, 37, 9, "良"],
	[29, 82, 92, 174, 3.29, 0, 13, "良"],
	[30, 106, 116, 188, 3.628, 101, 16, "轻度污染"],
	[31, 118, 50, 0, 1.383, 76, 11, "轻度污染"]
]
var dataSH = [
	[1, 91, 45, 125, 0.82, 34, 23, "良"],
	[2, 65, 27, 78, 0.86, 45, 29, "良"],
	[3, 83, 60, 84, 1.09, 73, 27, "良"],
	[4, 109, 81, 121, 1.28, 68, 51, "轻度污染"],
	[5, 106, 77, 114, 1.07, 55, 51, "轻度污染"],
	[6, 109, 81, 121, 1.28, 68, 51, "轻度污染"],
	[7, 106, 77, 114, 1.07, 55, 51, "轻度污染"],
	[8, 89, 65, 78, 0.86, 51, 26, "良"],
	[9, 53, 33, 47, 0.64, 50, 17, "良"],
	[10, 80, 55, 80, 1.01, 75, 24, "良"],
	[11, 117, 81, 124, 1.03, 45, 24, "轻度污染"],
	[12, 99, 71, 142, 1.1, 62, 42, "良"],
	[13, 95, 69, 130, 1.28, 74, 50, "良"],
	[14, 116, 87, 131, 1.47, 84, 40, "轻度污染"],
	[15, 108, 80, 121, 1.3, 85, 37, "轻度污染"],
	[16, 134, 83, 167, 1.16, 57, 43, "轻度污染"],
	[17, 79, 43, 107, 1.05, 59, 37, "良"],
	[18, 71, 46, 89, 0.86, 64, 25, "良"],
	[19, 97, 71, 113, 1.17, 88, 31, "良"],
	[20, 84, 57, 91, 0.85, 55, 31, "良"],
	[21, 87, 63, 101, 0.9, 56, 41, "良"],
	[22, 104, 77, 119, 1.09, 73, 48, "轻度污染"],
	[23, 87, 62, 100, 1, 72, 28, "良"],
	[24, 168, 128, 172, 1.49, 97, 56, "中度污染"],
	[25, 65, 45, 51, 0.74, 39, 17, "良"],
	[26, 39, 24, 38, 0.61, 47, 17, "优"],
	[27, 39, 24, 39, 0.59, 50, 19, "优"],
	[28, 93, 68, 96, 1.05, 79, 29, "良"],
	[29, 188, 143, 197, 1.66, 99, 51, "中度污染"],
	[30, 174, 131, 174, 1.55, 108, 50, "中度污染"],
	[31, 187, 143, 201, 1.39, 89, 53, "中度污染"]
]

export let schema = [
	{
		name: 'date',
		index: 0,
		text: '日'
	},
	{
		name: 'AQIindex',
		index: 1,
		text: '光照量'
	}
]
export let itemStyle = {
	normal: {
		opacity: 0.8,
		shadowBlur: 10,
		shadowOffsetX: 0,
		shadowOffsetY: 0,
		shadowColor: 'rgba(0, 0, 0, 0.5)'
	}
}
export let scatterOption = {
	color: [
		'#3DB527', '#80F1BE'
	],
	legend: {
		y: 'top',
		data: ['基地1', '基地2'],
		textStyle: {
			color: '#fff',
			fontSize: 16
		}
	},
	grid: {
		left: 30,
		right: 50,
		top: 20,
		bottom: 30,
	},
	tooltip: {
		padding: 5,
		backgroundColor: '#3DB527',
		borderColor: '#777',
		borderWidth: 1,
		formatter: function (obj) {
			var value = obj.value;
			return '<div style="border-bottom: 1px solid rgba(255,255,255,.3); font-size: 18px;padding-bottom: 7px;margin-bottom: 7px">' +
				obj.seriesName + ' ' + value[0] + '日：' +
				value[7] +
				'</div>' +
				schema[0].text + '：' + value[1] + '<br>' +
				schema[1].text + '：' + value[2] + '<br>';
		}
	},
	xAxis: {
		type: 'value',
		name: '日期',
		nameGap: 10,
		nameTextStyle: {
			color: '#fff',
			fontSize: 14
		},
		max: 31,
		splitNumber: 7,
		interval: 7,
		splitLine: {
			show: false,
			lineStyle: {
				color: ['#333']
			}
		},
		axisLine: {
			lineStyle: {
				color: '#eee'
			}
		}
	},
	yAxis: {
		type: 'value',
		nameLocation: 'end',
		nameGap: 10,
		nameTextStyle: {
			color: '#fff',
			fontSize: 14
		},
		axisLine: {
			lineStyle: {
				color: '#eee'
			}
		},
		splitLine: {
			show: true,
			lineStyle: {
				color: ['#333']
			}
		}
	},
	visualMap: [{
		left: 'right',
		bottom: '40',
		dimension: 6,
		min: 0,
		max: 50,
		itemWidth: 10,
		itemHeight: 120,
		calculable: true,
		precision: 0.1,
		text: ['光照量'],
		textGap: 10,
		textStyle: {
			color: '#fff'
		},
		inRange: {
			colorLightness: [1, 0.5]
		},
		outOfRange: {
			color: ['rgba(255,255,255,.2)']
		},
		controller: {
			inRange: {
				color: ['#3DB527']
			},
			outOfRange: {
				color: ['#444']
			}
		}
	}],
	series: [{
		name: '基地1',
		type: 'scatter',
		itemStyle: itemStyle,
		data: dataSH
	},
	{
		name: '基地2',
		type: 'scatter',
		itemStyle: itemStyle,
		data: dataGZ
	}
	]
};


/**
 * 二十四节气图形
 */
var polarData = [
	[5000, 10000, 6785.71],
	[4000, 10000, 6825],
	[3000, 6500, 4463.33],
	[2500, 5600, 3793.83],
	[2000, 4000, 3060],
	[2000, 4000, 3222.33],
	[2500, 4000, 3133.33],
	[1800, 4000, 3100],
	[2000, 3500, 2750],
	[2000, 3000, 2500],
	[1800, 3000, 2433.33],
	[2000, 2700, 2375],
	[1500, 2800, 2150],
	[1500, 2300, 2100],
	[1600, 3500, 2057.14],
	[1500, 2600, 2037.5],
	[1500, 2417.54, 1905.85],
	[1500, 2000, 1775],
	[1500, 1800, 1650]
];
var cities = ['立春', '雨水', '惊蛰', '春分', '清明', '谷雨', '立夏',
	'小满', '芒种', '夏至', '小暑', '大暑', '立秋', '处暑',
	'白露', '秋分', '寒露', '霜降', '立冬',
	'小雪', '大雪', '冬至', '小寒', '大寒'
];
var barHeight = 50;

export let polarOption = {
	legend: {
		show: true,
		data: ['平均范围', '均值']
	},
	grid: {
	},
	angleAxis: {
		type: 'category',
		data: cities,
		axisLine: { //坐标轴轴线设置
			lineStyle: {
				color: '#FFF',
			}
		}
	},
	tooltip: {
		show: true,
		formatter: function (params) {
			var id = params.dataIndex;
			return cities[id] + '<br>最低：' + polarData[id][0] + '<br>最高：' + polarData[id][1] + '<br>平均：' + polarData[id][2];
		}
	},
	radiusAxis: {
		axisLabel: { //刻度标签设置
			margin: 0, //刻度与坐标轴之间的距离
			textStyle: {
				color: '#FFF'
			}
		}
	},
	polar: {},
	series: [{
		type: 'bar',
		itemStyle: {
			normal: {
				color: 'transparent'
			}
		},
		data: polarData.map(function (d) {
			return d[0];
		}),
		coordinateSystem: 'polar',
		stack: '最大最小值',
		silent: true
	}, {
		type: 'bar',
		data: polarData.map(function (d) {
			return d[1] - d[0];
		}),
		coordinateSystem: 'polar',
		name: '平均范围',
		stack: '最大最小值'
	}, {
		type: 'bar',
		itemStyle: {
			normal: {
				color: 'transparent'
			}
		},
		data: polarData.map(function (d) {
			return d[2] - barHeight;
		}),
		coordinateSystem: 'polar',
		stack: '均值',
		silent: true,
		z: 10
	}, {
		type: 'bar',
		data: polarData.map(function (d) {
			return barHeight * 2
		}),
		coordinateSystem: 'polar',
		name: '均值',
		stack: '均值',
		barGap: '-100%',
		z: 10
	}],
	legend: {
		show: true,
		data: ['A', 'B', 'C']
	}
};
export let yxPolygonsBoundaries =
	["115.704669, 29.272915;115.70111, 29.264018;115.704447, 29.258098;115.707952, 29.254947;115.714375, 29.256184;115.718088, 29.247509;115.726335, 29.250088;115.730281, 29.236342;115.741014, 29.236531;115.753909, 29.205586;115.77145, 29.195977;115.770321, 29.183849;115.774313, 29.181002;115.774382, 29.176094;115.792382, 29.184547;115.796065, 29.168745;115.807489, 29.170986;115.814627, 29.165161;115.8125, 29.158759;115.829333, 29.151616;115.8421, 29.158272;115.841369, 29.165857;115.846623, 29.172773;115.843311, 29.177873;115.835569, 29.176097;115.838518, 29.182083;115.831715, 29.180491;115.836184, 29.190421;115.829953, 29.189924;115.826657, 29.185147;115.823549, 29.187957;115.825738, 29.192168;115.84593, 29.198312;115.841354, 29.182463;115.845906, 29.180218;115.851664, 29.188178;115.852573, 29.182889;115.848654, 29.178856;115.85555, 29.179594;115.855974, 29.175669;115.864153, 29.178075;115.865853, 29.175567;115.864825, 29.172921;115.852864, 29.173551;115.855851, 29.163529;115.859998, 29.162782;115.870643, 29.170557;115.875952, 29.160366;115.882899, 29.15534;115.892404, 29.153939;115.89775, 29.16048;115.898994, 29.152511;115.907769, 29.144359;115.942266, 29.153944;115.977793, 29.188819;115.988298, 29.189478;116.003458, 29.183931;116.025643, 29.200985;116.040381, 29.202985;116.04053, 29.212213;116.034603, 29.215923;116.034527, 29.224342;116.030578, 29.228768;116.031357, 29.237018;116.018322, 29.240904;116.007227, 29.249013;115.999059, 29.260026;115.998087, 29.268862;116.003169, 29.278874;116.051508, 29.310132;116.058284, 29.286477;116.082201, 29.259033;116.096167, 29.250045;116.168879, 29.235295;116.20355, 29.237167;116.230974, 29.23315;116.247176, 29.204346;116.292497, 29.178538;116.303256, 29.110166;116.292094, 29.115729;116.279718, 29.111895;116.272016, 29.104049;116.267772, 29.093116;116.266993, 29.084643;116.282352, 29.033984;116.275392, 29.0093;116.255342, 29.007011;116.244268, 28.995598;116.239638, 29.009403;116.24291, 29.019537;116.241228, 29.031323;116.233541, 29.040142;116.187528, 29.048093;116.148466, 29.089962;116.156463, 29.106857;116.178966, 29.124254;116.138494, 29.127805;116.117631, 29.123847;116.098483, 29.125729;116.092706, 29.117475;116.067656, 29.12117;116.050406, 29.110368;116.0497, 29.114164;116.043935, 29.114328;116.037568, 29.10192;116.025289, 29.09468;116.01397, 29.10789;116.017028, 29.113576;116.011605, 29.114678;116.010788, 29.117816;115.99151, 29.093304;115.98616, 29.097827;115.985621, 29.104883;115.965406, 29.103118;115.944848, 29.095331;115.942769, 29.099589;115.937525, 29.100442;115.928898, 29.087954;115.921082, 29.083579;115.928375, 29.066749;115.920859, 29.055664;115.921751, 29.049014;115.915202, 29.040337;115.906848, 29.041164;115.898677, 29.030265;115.887609, 29.030516;115.896014, 29.019707;115.896492, 29.012856;115.88981, 29.015322;115.889647, 29.002858;115.867766, 28.983128;115.868157, 28.974105;115.848361, 28.97671;115.843166, 28.972084;115.840176, 28.976428;115.829502, 28.978611;115.826135, 28.984507;115.831714, 28.963;115.82893, 28.962174;115.831239, 28.944495;115.823786, 28.938876;115.827557, 28.932473;115.823033, 28.928922;115.822645, 28.916917;115.818626, 28.913911;115.812077, 28.914825;115.80575, 28.904411;115.793763, 28.910073;115.785877, 28.910086;115.774379, 28.899104;115.768749, 28.899559;115.760919, 28.904476;115.763111, 28.909937;115.7581, 28.912744;115.75775, 28.919505;115.751333, 28.920286;115.744852, 28.934026;115.738373, 28.93881;115.733615, 28.937569;115.732985, 28.927124;115.728943, 28.922621;115.711406, 28.928123;115.706553, 28.923141;115.703753, 28.928644;115.695969, 28.930473;115.685026, 28.927878;115.684966, 28.935674;115.675954, 28.934592;115.670725, 28.940183;115.677153, 28.946196;115.688336, 28.948589;115.691186, 28.954185;115.68774, 28.956;115.688118, 28.960461;115.682397, 28.950874;115.671208, 28.955031;115.66472, 28.949976;115.658891, 28.954445;115.652277, 28.948089;115.643158, 28.954679;115.635895, 28.949892;115.628401, 28.96804;115.618757, 28.970021;115.613225, 28.966756;115.597333, 28.967835;115.600073, 28.972838;115.608084, 28.969878;115.603304, 28.975783;115.58721, 28.976425;115.586703, 28.971831;115.593701, 28.971756;115.585174, 28.967444;115.556469, 28.994333;115.55532, 28.9995;115.560009, 29.002233;115.551577, 29.003197;115.536992, 29.017447;115.512813, 29.02131;115.502209, 29.012729;115.491035, 29.016051;115.48125, 29.011543;115.475358, 29.018922;115.47589, 29.030294;115.454045, 29.036692;115.443063, 29.047933;115.45245, 29.065851;115.434555, 29.072028;115.431896, 29.079317;115.434865, 29.099773;115.448499, 29.101862;115.454663, 29.125984;115.451283, 29.130836;115.440818, 29.13254;115.442219, 29.152965;115.429647, 29.169514;115.433006, 29.179852;115.41649, 29.223349;115.42087, 29.241819;115.403469, 29.28621;115.407887, 29.304208;115.401822, 29.324677;115.4082, 29.329769;115.395764, 29.334559;115.38968, 29.349153;115.391395, 29.359613;115.403351, 29.353673;115.423041, 29.356009;115.429643, 29.35128;115.444129, 29.350871;115.463719, 29.338125;115.460349, 29.331;115.463206, 29.326911;115.479585, 29.334725;115.495269, 29.324504;115.515022, 29.316915;115.531493, 29.31925;115.560983, 29.312623;115.581133, 29.317525;115.597409, 29.314305;115.608443, 29.318069;115.619469, 29.314743;115.624993, 29.31922;115.63856, 29.321091;115.649177, 29.314106;115.652336, 29.302481;115.669602, 29.29566;115.684884, 29.298261;115.693706, 29.293925;115.69787, 29.276928;115.704669, 29.272915"]
;
// export let yxData = { "type": "FeatureCollection", "features": [{ "type": "Feature", "geometry": { "type": "Polygon", "coordinates": [[[115.72112, 29.2759], [115.72512, 29.27217], [115.73245, 29.27277], [115.73429, 29.26916], [115.73789, 29.26743], [115.74315, 29.26896], [115.74673, 29.26813], [115.74408, 29.26451], [115.74497, 29.25822], [115.7471, 29.25222], [115.75178, 29.24646], [115.75108, 29.24301], [115.7545, 29.2397], [115.7515, 29.22925], [115.74411, 29.21756], [115.74356, 29.21006], [115.76014, 29.19408], [115.76274, 29.18911], [115.76921, 29.18644], [115.77161, 29.17511], [115.78638, 29.17715], [115.78685, 29.17403], [115.78899, 29.17119], [115.78862, 29.16618], [115.79772, 29.1587], [115.80554, 29.15512], [115.80725, 29.1515], [115.81299, 29.1471], [115.82535, 29.14762], [115.8351, 29.15141], [115.84045, 29.15607], [115.84041, 29.15761], [115.83807, 29.15946], [115.83655, 29.16505], [115.84241, 29.16954], [115.84087, 29.17136], [115.83545, 29.17259], [115.83348, 29.17595], [115.83552, 29.17693], [115.83839, 29.17406], [115.8405, 29.17521], [115.84117, 29.18198], [115.84628, 29.1889], [115.84954, 29.18698], [115.85023, 29.1768], [115.85284, 29.17235], [115.85582, 29.17043], [115.86126, 29.17085], [115.86272, 29.16936], [115.86317, 29.16594], [115.8694, 29.16503], [115.87293, 29.1625], [115.87931, 29.16173], [115.87311, 29.15359], [115.87469, 29.15], [115.87663, 29.14863], [115.8856, 29.14812], [115.88757, 29.14919], [115.88772, 29.15272], [115.89253, 29.15605], [115.89417, 29.15574], [115.89804, 29.1505], [115.90354, 29.14977], [115.91559, 29.15246], [115.92219, 29.15761], [115.92252, 29.16212], [115.92608, 29.16904], [115.92385, 29.16879], [115.92382, 29.17002], [115.92917, 29.17803], [115.93014, 29.19198], [115.9322, 29.19018], [115.93395, 29.18483], [115.92959, 29.17546], [115.93113, 29.16937], [115.93215, 29.16908], [115.93466, 29.17723], [115.93792, 29.17953], [115.94093, 29.17925], [115.94395, 29.17547], [115.94417, 29.17309], [115.93637, 29.16394], [115.94601, 29.15551], [115.95597, 29.16557], [115.96429, 29.17775], [115.97057, 29.18311], [115.98269, 29.18298], [115.99808, 29.1786], [116.00282, 29.18017], [116.01324, 29.18686], [116.0198, 29.19298], [116.02418, 29.20819], [116.02456, 29.21515], [116.02093, 29.22233], [116.01351, 29.23033], [115.99778, 29.24062], [115.99191, 29.24676], [115.98766, 29.25477], [115.9874, 29.26278], [115.98921, 29.26597], [116.00395, 29.27816], [116.03132, 29.29224], [116.03477, 29.29558], [116.04417, 29.29867], [116.05367, 29.27946], [116.07018, 29.26019], [116.07946, 29.25128], [116.08973, 29.24531], [116.16068, 29.22961], [116.17043, 29.22899], [116.19612, 29.23126], [116.21695, 29.23], [116.22402, 29.22841], [116.23098, 29.22434], [116.244, 29.21458], [116.25278, 29.19565], [116.2541, 29.16949], [116.25293, 29.16633], [116.24817, 29.16164], [116.2111, 29.12906], [116.17353, 29.11808], [116.13251, 29.12239], [116.11197, 29.11775], [116.09277, 29.11948], [116.09121, 29.11519], [116.08617, 29.11278], [116.0647, 29.1165], [116.04263, 29.10271], [116.04389, 29.10662], [116.04324, 29.10855], [116.03899, 29.10816], [116.03838, 29.10462], [116.03944, 29.102], [116.03329, 29.09595], [116.02754, 29.09533], [116.0257, 29.09097], [116.02147, 29.09039], [116.01863, 29.08856], [116.01628, 29.09416], [116.0083, 29.09943], [116.00805, 29.10592], [116.01061, 29.10765], [116.00579, 29.1082], [116.00373, 29.11175], [116.0017, 29.10707], [115.99687, 29.10368], [115.99578, 29.09875], [115.99214, 29.09593], [115.98784, 29.08928], [115.9845, 29.08899], [115.9826, 29.09064], [115.98039, 29.09385], [115.98069, 29.09974], [115.97833, 29.10035], [115.95803, 29.09661], [115.95243, 29.09298], [115.94568, 29.09294], [115.93839, 29.0897], [115.93613, 29.09258], [115.93004, 29.09378], [115.92934, 29.09026], [115.92618, 29.08931], [115.9215, 29.08366], [115.92127, 29.07899], [115.9157, 29.07662], [115.91511, 29.07212], [115.9214, 29.06046], [115.91498, 29.04915], [115.90865, 29.03309], [115.90603, 29.03058], [115.89453, 29.02647], [115.88693, 29.02006], [115.88272, 29.00837], [115.87346, 28.9914], [115.85832, 28.96962], [115.83886, 28.9671], [115.82357, 28.97036], [115.82032, 28.96883], [115.81968, 28.96572], [115.82588, 28.94619], [115.82617, 28.94194], [115.82504, 28.936], [115.82278, 28.93289], [115.81656, 28.93009], [115.81515, 28.92512], [115.8166, 28.91356], [115.81597, 28.90953], [115.80872, 28.90665], [115.79922, 28.89939], [115.78944, 28.89999], [115.78151, 28.898], [115.77326, 28.89932], [115.76419, 28.89247], [115.76119, 28.8925], [115.75616, 28.89626], [115.75488, 28.90489], [115.75081, 28.91086], [115.74054, 28.91883], [115.73924, 28.92586], [115.73722, 28.92941], [115.72958, 28.93114], [115.7268, 28.92997], [115.72631, 28.92086], [115.72373, 28.91783], [115.72107, 28.91686], [115.71784, 28.91713], [115.70804, 28.92161], [115.70065, 28.92075], [115.69488, 28.92299], [115.68313, 28.92453], [115.67868, 28.92301], [115.67702, 28.92365], [115.67437, 28.92777], [115.66636, 28.92894], [115.66389, 28.93339], [115.66462, 28.93664], [115.66884, 28.93953], [115.67409, 28.94167], [115.67839, 28.94073], [115.68188, 28.94312], [115.68286, 28.94687], [115.68067, 28.9479], [115.68254, 28.95166], [115.68108, 28.95496], [115.67804, 28.95405], [115.67597, 28.94697], [115.67226, 28.94442], [115.66843, 28.94386], [115.66634, 28.94758], [115.66091, 28.94878], [115.65734, 28.9454], [115.65249, 28.94782], [115.64938, 28.94726], [115.64453, 28.94184], [115.64346, 28.94407], [115.63617, 28.94848], [115.63207, 28.94741], [115.62495, 28.9493], [115.62275, 28.9521], [115.6218, 28.95821], [115.62292, 28.95916], [115.61666, 28.96401], [115.61327, 28.96515], [115.59837, 28.96561], [115.58845, 28.96905], [115.57697, 28.96951], [115.57123, 28.97112], [115.55975, 28.98122], [115.54253, 29.00098], [115.52532, 29.01501], [115.52115, 29.01685], [115.51281, 29.01847], [115.50813, 29.01803], [115.48256, 29.01013], [115.47555, 29.00619], [115.47292, 29.01177], [115.47007, 29.01295], [115.47148, 29.02272], [115.46973, 29.02619], [115.46422, 29.02617], [115.45643, 29.02974], [115.45043, 29.03001], [115.44663, 29.03519], [115.44419, 29.03539], [115.44049, 29.04019], [115.43784, 29.04159], [115.43986, 29.04719], [115.44348, 29.04946], [115.44736, 29.05463], [115.4472, 29.05952], [115.44012, 29.06294], [115.42985, 29.06564], [115.42897, 29.07128], [115.42643, 29.07483], [115.42849, 29.07891], [115.42996, 29.08728], [115.44509, 29.09807], [115.44743, 29.10312], [115.44821, 29.11505], [115.43508, 29.15176], [115.43036, 29.15864], [115.42721, 29.17034], [115.42693, 29.17859], [115.42402, 29.18022], [115.41639, 29.17985], [115.40924, 29.18411], [115.4122, 29.19146], [115.41593, 29.19602], [115.41385, 29.20689], [115.41434, 29.2102], [115.4127, 29.213], [115.40919, 29.2106], [115.4082, 29.21231], [115.41019, 29.21976], [115.41201, 29.2204], [115.41525, 29.22515], [115.41585, 29.23734], [115.4082, 29.266], [115.39979, 29.28388], [115.39924, 29.2871], [115.40056, 29.28743], [115.40126, 29.29152], [115.40031, 29.29513], [115.40214, 29.30044], [115.39643, 29.31891], [115.3984, 29.32079], [115.40922, 29.32231], [115.40677, 29.32574], [115.40436, 29.32628], [115.40105, 29.32562], [115.39492, 29.32731], [115.39306, 29.32548], [115.39024, 29.33503], [115.38683, 29.34029], [115.38656, 29.34396], [115.39021, 29.35407], [115.39859, 29.3596], [115.40201, 29.35593], [115.44893, 29.33717], [115.45155, 29.3335], [115.45294, 29.32543], [115.45706, 29.32271], [115.46412, 29.32271], [115.47012, 29.32637], [115.48659, 29.32452], [115.4926, 29.32037], [115.49636, 29.31926], [115.5229, 29.31619], [115.55216, 29.30857], [115.58487, 29.31199], [115.59194, 29.31038], [115.59979, 29.31038], [115.62629, 29.31405], [115.63353, 29.31302], [115.64096, 29.3056], [115.64909, 29.29437], [115.65382, 29.29278], [115.66747, 29.29188], [115.67194, 29.29327], [115.68453, 29.28779], [115.68741, 29.27724], [115.69264, 29.26921], [115.70078, 29.2706], [115.71285, 29.27521], [115.71942, 29.27659], [115.72112, 29.2759]]] }, "properties": { "name": "永修县", "adcode": "360425", "telecode": "0792", "level": "district", "parent": { "name": "九江市", "level": "city", "adcode": "360400", "center": { "crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:EPSG:6.3:4326" } }, "type": "Point", "coordinates": [115.992811, 29.712034] } }, "center": { "lng": 115.809055, "lat": 29.018212 } } }] };
export let TKData = {
	"type": "FeatureCollection",
	"features": [
		{
			"type": "Feature",
			"properties": {

				"name": "田块5"
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							115.84259033203124,
							28.66588869403797
						],
						[
							115.84816932678223,
							28.66347872760795
						],
						[
							115.85052967071532,
							28.66735724015715
						],
						[
							115.84589481353758,
							28.669428231759998
						],
						[
							115.84259033203124,
							28.66588869403797
						]
					]
				]
			}
		},
		{
			"type": "Feature",
			"properties": {
				"stroke": "#555555",
				"stroke-width": 2,
				"stroke-opacity": 1,
				"fill": "#555555",
				"fill-opacity": 0.5,
				"name": "田块4"
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							115.84533691406249,
							28.66957884773452
						],
						[
							115.84203243255614,
							28.671047342140348
						],
						[
							115.83980083465576,
							28.672214592243147
						],
						[
							115.83744049072264,
							28.66814798723585
						],
						[
							115.84203243255614,
							28.66630290143724
						],
						[
							115.84533691406249,
							28.66957884773452
						]
					]
				]
			}
		},
		{
			"type": "Feature",
			"properties": {
				"stroke": "#555555",
				"stroke-width": 2,
				"stroke-opacity": 1,
				"fill": "#555555",
				"fill-opacity": 0.5,
				"name": "田块2"
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							115.84203243255614,
							28.67560330918349
						],
						[
							115.8401870727539,
							28.67266642750149
						],
						[
							115.84100246429443,
							28.67213928617731
						],
						[
							115.84228992462158,
							28.671800408211258
						],
						[
							115.84331989288329,
							28.670972035235582
						],
						[
							115.84563732147217,
							28.67006834815653
						],
						[
							115.84688186645508,
							28.67447374904897
						],
						[
							115.84203243255614,
							28.67560330918349
						]
					]
				]
			}
		},
		{
			"type": "Feature",
			"properties": {
				"stroke": "#555555",
				"stroke-width": 2,
				"stroke-opacity": 1,
				"fill": "#555555",
				"fill-opacity": 0.5,
				"name": "田块3"
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							115.84722518920897,
							28.674021921585027
						],
						[
							115.84615230560303,
							28.66988007903407
						],
						[
							115.85070133209229,
							28.667771441752063
						],
						[
							115.85234284400939,
							28.672577001927934
						],
						[
							115.85237234830856,
							28.672725260074042
						],
						[
							115.85239917039871,
							28.672824098721534
						],
						[
							115.85238575935362,
							28.672988829593525
						],
						[
							115.85235357284546,
							28.673118260811247
						],
						[
							115.85227042436601,
							28.673235925415884
						],
						[
							115.85222482681273,
							28.673287697800053
						],
						[
							115.85213363170624,
							28.673358296464507
						],
						[
							115.85196733474731,
							28.67341948193521
						],
						[
							115.84808349609375,
							28.674309020511792
						],
						[
							115.84793329238892,
							28.67432078684445
						],
						[
							115.84771066904067,
							28.674334906441914
						],
						[
							115.84752827882767,
							28.674318433578023
						],
						[
							115.84738343954085,
							28.674226656146054
						],
						[
							115.84722518920897,
							28.674021921585027
						]
					]
				]
			}
		},
		{
			"type": "Feature",
			"properties": {
				"stroke": "#555555",
				"stroke-width": 2,
				"stroke-opacity": 1,
				"fill": "#555555",
				"fill-opacity": 0.5,
				"name": "田块1"
			},
			"geometry": {
				"type": "Polygon",
				"coordinates": [
					[
						[
							115.83831757307051,
							28.677514120682194
						],
						[
							115.83881914615631,
							28.677252915748277
						],
						[
							115.83967208862305,
							28.67686463694008
						],
						[
							115.84089517593382,
							28.67631869096929
						],
						[
							115.84132432937622,
							28.67609278145945
						],
						[
							115.84192514419556,
							28.67646929703852
						],
						[
							115.84233283996582,
							28.677259975349635
						],
						[
							115.84362030029297,
							28.679613149295562
						],
						[
							115.8434271812439,
							28.679989652220986
						],
						[
							115.84068059921265,
							28.681137977784555
						],
						[
							115.83831757307051,
							28.677514120682194
						]
					]
				]
			}
		}
	]
}
var geoCoordMap = {
	'田块1': [115.83831757307051, 28.677514120682194],
	'田块2': [115.83831757307051, 28.677514120682194],
	'田块3': [115.8434271812439, 28.679989652220986],
	'田块4': [115.83831757307051, 28.677514120682194],
	'田块5': [115.85227042436601, 28.673235925415884
	],
}
var data = [
	{ name: '田块1', value: 29 },
	{ name: '田块2', value: 23 },
	{ name: '田块3', value: 137 },
	{ name: '田块4', value: 165 },
	{ name: '田块5', value: 70 }
];
var convertData = function (data) {
	var res = [];
	for (var i = 0; i < data.length; i++) {
		var geoCoord = geoCoordMap[data[i].name];
		if (geoCoord) {
			res.push({
				name: data[i].name,
				value: geoCoord.concat(data[i].value)
			});
		}
	}
	return res;
};
export let BMapOption = {
	geo: {
		map: 'tk',
		show: true,
		roam: 'scale',
		// center: [115.824584, 29.17314],
		label: {
			show: true,
			color: '#fff',
			emphasis: {
				show: false,
				color: '#fff',
			}
		},
		itemStyle: {
			normal: {
				areaColor: 'red',
				borderColor: '#fff',
				borderWidth: 2,
				shadowColor: '#5AB2FE',
				shadowBlur: 20
			}
		},
		emphasis: {
		},
		zoom: .5,
		series: [
			{
				type: 'map',
				map: 'tk',
				geoIndex: 1,
				aspectScale: 0.75, //长宽比
				zoom: 1.2,
				label: {
					emphasis: {
						show: false,
						textStyle: {
							color: '#05C3F9'
						}
					}
				},
				roam: false,
				itemStyle: {
					normal: {
						areaColor: 'transparent',
						borderColor: '#fff',
						borderWidth: 2
					},
					emphasis: {
						areaColor: '#C9E6FF',
						shadowColor: '#5AB2FE',
						shadowBlur: 20
					}
				},
				data: TKData,
			},
			{
				name: '企业数',
				type: 'scatter',
				coordinateSystem: 'geo',
				symbol: 'circle',
				symbolSize: function (val) {
					var num = val[2] / 2;
					if (num < 20) {
						return 20
					} else {
						return num;
					}
				},
				label: {
					normal: {
						show: true,
						formatter: function (value) {
							return value.value[2]
						},
						textStyle: {
							color: '#fff',
							fontSize: 12,
						}
					}
				},
				itemStyle: {
					normal: {
						color: '#1C3E64', //标志颜色
					}
				},
				zlevel: 6,
				data: convertData(data),
			}
		]
	},
};


// 二十四节气

/**
 * start 仪表盘
 */
export let gaugeOption = {
	color: 'red',
	tooltip: {
		formatter: "{a} <br/>{c} {b}"
	},
	series: [
		{
			name: '速度',
			type: 'gauge',
			min: 0,
			max: 220,
			splitNumber: 11,
			radius: '80%',
			axisLine: { // 坐标轴线
				lineStyle: { // 属性lineStyle控制线条样式
					color: [
						[0.09, 'lime'],
						[0.82, '#1e90ff'],
						[1, '#ff4500']
					],
					width: 3,
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisLabel: { // 坐标轴小标记
				textStyle: { // 属性lineStyle控制线条样式
					fontWeight: 'bolder',
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 5
				}
			},
			axisTick: { // 坐标轴小标记
				length: 15, // 属性length控制线长
				lineStyle: { // 属性lineStyle控制线条样式
					color: 'auto',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			splitLine: { // 分隔线
				length: 25, // 属性length控制线长
				lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
					width: 3,
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			pointer: { // 分隔线
				shadowColor: '#fff', //默认透明
				shadowBlur: 5
			},
			title: {
				textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
					fontWeight: 'bolder',
					fontSize: 13,
					fontStyle: 'italic',
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			detail: {
				backgroundColor: 'rgba(30,144,255,0.8)',
				borderWidth: 1,
				borderColor: '#fff',
				shadowColor: '#fff', //默认透明
				shadowBlur: 5,
				offsetCenter: [0, '50%'], // x, y，单位px
				textStyle: { // 其余属性默认使用全局文本样式，详见TEXTSTYLE
					fontWeight: 'bolder',
					color: '#fff'
				}
			},
			data: [{
				value: 40,
				name: '作物健康值'
			}]
		},
		{
			name: '油表',
			type: 'gauge',
			center: ['15%', '50%'], // 默认全局居中
			radius: '50%',
			min: 0,
			max: 2,
			startAngle: 135,
			endAngle: 45,
			splitNumber: 2,
			axisLine: { // 坐标轴线
				lineStyle: { // 属性lineStyle控制线条样式
					color: [
						[0.2, 'lime'],
						[0.8, '#1e90ff'],
						[1, '#ff4500']
					],
					width: 2,
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisTick: { // 坐标轴小标记
				length: 12, // 属性length控制线长
				lineStyle: { // 属性lineStyle控制线条样式
					color: 'auto',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisLabel: {
				textStyle: { // 属性lineStyle控制线条样式
					fontWeight: 'bolder',
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				},
				formatter: function (v) {
					switch (v + '') {
						case '0':
							return '0';
						case '1':
							return '风速';
						case '2':
							return '12';
					}
				}
			},
			splitLine: { // 分隔线
				length: 15, // 属性length控制线长
				lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
					width: 3,
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			pointer: {
				width: 2,
				shadowColor: '#fff', //默认透明
				shadowBlur: 5
			},
			title: {
				show: false
			},
			detail: {
				show: false
			},
			data: [{
				value: 0.5,
				name: '水位'
			}]
		},
		{
			name: '水表',
			type: 'gauge',
			center: ['15%', '50%'], // 默认全局居中
			radius: '50%',
			min: 0,
			max: 2,
			startAngle: 315,
			endAngle: 225,
			splitNumber: 2,
			axisLine: { // 坐标轴线
				lineStyle: { // 属性lineStyle控制线条样式
					color: [
						[0.2, 'lime'],
						[0.8, '#1e90ff'],
						[1, '#ff4500']
					],
					width: 2,
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisTick: { // 坐标轴小标记
				show: false
			},
			axisLabel: {
				textStyle: { // 属性lineStyle控制线条样式
					fontWeight: 'bolder',
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				},
				formatter: function (v) {
					switch (v + '') {
						case '0':
							return 'H';
						case '1':
							return '光照';
						case '2':
							return 'L';
					}
				}
			},
			splitLine: { // 分隔线
				length: 15, // 属性length控制线长
				lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
					width: 3,
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			pointer: {
				width: 2,
				shadowColor: '#fff', //默认透明
				shadowBlur: 5
			},
			title: {
				show: false
			},
			detail: {
				show: false
			},
			data: [{
				value: 0.5,
				name: '水温'
			}]
		},
		{
			name: '油表',
			type: 'gauge',
			center: ['85%', '50%'], // 默认全局居中
			radius: '50%',
			min: 0,
			max: 2,
			startAngle: 135,
			endAngle: 45,
			splitNumber: 2,
			axisLine: { // 坐标轴线
				lineStyle: { // 属性lineStyle控制线条样式
					color: [
						[0.2, 'lime'],
						[0.8, '#1e90ff'],
						[1, '#ff4500']
					],
					width: 2,
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisTick: { // 坐标轴小标记
				length: 12, // 属性length控制线长
				lineStyle: { // 属性lineStyle控制线条样式
					color: 'auto',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisLabel: {
				textStyle: { // 属性lineStyle控制线条样式
					fontWeight: 'bolder',
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				},
				formatter: function (v) {
					switch (v + '') {
						case '0':
							return 'E';
						case '1':
							return '水位';
						case '2':
							return 'F';
					}
				}
			},
			splitLine: { // 分隔线
				length: 15, // 属性length控制线长
				lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
					width: 3,
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			pointer: {
				width: 2,
				shadowColor: '#fff', //默认透明
				shadowBlur: 5
			},
			title: {
				show: false
			},
			detail: {
				show: false
			},
			data: [{
				value: 0.5,
				name: '水位'
			}]
		},
		{
			name: '水表',
			type: 'gauge',
			center: ['85%', '50%'], // 默认全局居中
			radius: '50%',
			min: 0,
			max: 2,
			startAngle: 315,
			endAngle: 225,
			splitNumber: 2,
			axisLine: { // 坐标轴线
				lineStyle: { // 属性lineStyle控制线条样式
					color: [
						[0.2, 'lime'],
						[0.8, '#1e90ff'],
						[1, '#ff4500']
					],
					width: 2,
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			axisTick: { // 坐标轴小标记
				show: false
			},
			axisLabel: {
				textStyle: { // 属性lineStyle控制线条样式
					fontWeight: 'bolder',
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				},
				formatter: function (v) {
					switch (v + '') {
						case '0':
							return 'H';
						case '1':
							return '水温';
						case '2':
							return 'C';
					}
				}
			},
			splitLine: { // 分隔线
				length: 15, // 属性length控制线长
				lineStyle: { // 属性lineStyle（详见lineStyle）控制线条样式
					width: 3,
					color: '#fff',
					shadowColor: '#fff', //默认透明
					shadowBlur: 10
				}
			},
			pointer: {
				width: 2,
				shadowColor: '#fff', //默认透明
				shadowBlur: 5
			},
			title: {
				show: false
			},
			detail: {
				show: false
			},
			data: [{
				value: 0.5,
				name: '水温'
			}]
		}
	]
}

/**
 * start 正负图 知识图
 */
export let entyOption = {
	color: ['#eb2100', '#0096f3'],
	tooltip: {
		trigger: 'axis',
		axisPointer: { // 坐标轴指示器，坐标轴触发有效
			type: 'shadow' // 默认为直线，可选为：'line' | 'shadow'
		}
	},
	legend: {
		data: ['A类', 'B类'],
		left: 'right',
		bottom: '20',
		textStyle: {
			color: '#FFF',
			fontSize: 13
		}
	},
	grid: {
		left: '0',
		right: '0',
		bottom: '30',
		top: '10',
		containLabel: true
	},
	xAxis: [{
		type: 'value',
		splitLine: {
			show: true,
			lineStyle: {
				color: ['#666']
			}
		},
	}],
	yAxis: [{
		type: 'category',
		axisTick: {
			show: false
		},
		data: ['周一', '周二', '周三', '周四', '周五', '周六', '周日']
	}],
	series: [
		{
			name: 'A类',
			type: 'bar',
			stack: '总量',
			barWidth: '10',
			label: {
				normal: {
					show: true,
				}
			},
			data: [320, 302, 341, 374, 390, 450, 420]
		},
		{
			name: 'B类',
			type: 'bar',
			stack: '总量',
			barWidth: '10',
			label: {
				normal: {
					show: true,
					position: 'left'
				}
			},
			data: [-120, -132, -101, -134, -190, -230, -210]
		}
	]
};
/**
 * end 正负图
 */


/**
 * 通知 处理 环形图
 */

var dataStyle = {
	normal: {
		label: {
			show: false
		},
		labelLine: {
			show: false
		},
		shadowBlur: 40,
		shadowColor: 'rgba(40, 40, 40, 0.5)',
	}
};

var placeHolderStyle = {
	normal: {
		color: 'rgba(44,59,70,1)', // 未完成的圆环的颜色
		label: {
			show: false
		},
		labelLine: {
			show: false
		}
	},
	emphasis: {
		color: 'rgba(44,59,70,1)' // 未完成的圆环的颜色
	}
};

export let noticOption = {
	tooltip: {
		show: true,
		formatter: "{a} <br/>{b} : {c} ({d}%)"
	},
	toolbox: {
		show: true,
	},
	// color : ['#3dd4de','#b697cd','#a6f08f'],
	backgroundColor: 'rgba(0,0,0,0)',
	series: [{
		name: '预警',
		type: 'pie',
		clockWise: false,
		radius: [50, 55],
		itemStyle: dataStyle,
		hoverAnimation: false,
		center: ['25%', '50%'],
		data: [{
			value: 25,
			name: '预警',
			label: {
				normal: {
					formatter: '{d}%',
					position: 'center',
					show: true,
					textStyle: {
						fontSize: '25',
						fontWeight: 'normal',
						color: '#3dd4de'
					}
				}
			},
			itemStyle: {
				normal: {
					color: '#3dd4de',
					shadowColor: '#3dd4de',
					shadowBlur: 10
				}
			}
		}, {
			value: 75,
			name: 'invisible',
			itemStyle: placeHolderStyle,
		}]
	}, {
		name: '预警',
		type: 'pie',
		clockWise: false,
		radius: [50, 55],
		itemStyle: dataStyle,
		hoverAnimation: false,
		center: ['75%', '50%'],
		data: [{
			value: 75,
			label: {
				normal: {
					formatter: '{d}%',
					position: 'center',
					show: true,
					textStyle: {
						fontSize: '25',
						fontWeight: 'normal',
						color: '#a6f08f'
					}
				}
			},
			itemStyle: {
				normal: {
					color: '#a6f08f',
					shadowColor: '#a6f08f',
					shadowBlur: 10
				}
			}
		}, {
			value: 25,
			name: 'invisible',
			itemStyle: placeHolderStyle,
		}]
	},]
}